<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./js/jquery.min.js"></script>

    <div>
        <ul>
            <li>列表1</li>
            <li>列表2</li>
            <li>列表3</li>
            <li>列表4</li>

            <li>列表5</li>
            <li>列表6</li>
            <li>列表7</li>
            <li>列表8</li>
        </ul>
    </div>

    <div>
        <div><img src="./imgs/气球.webp"></div>
        <div><img src="./imgs/飞机.webp"></div>
        <div><img src="./imgs/气球.webp"></div>
        <div><img src="./imgs/飞机.webp"></div>
        
        <div><img src="./imgs/气球.webp"></div>
        <div><img src="./imgs/飞机.webp"></div>
        <div><img src="./imgs/气球.webp"></div>
        <div><img src="./imgs/飞机.webp"></div>
    </div>
<script>
    $(function(){
        
        $('img').hide();

        $('img').height = '300px';
        $('img').width = '100px';
        $('li').mouseover(function() {
            console.log(11);
            $(this).css('background', 'yellow');
            $('img').hide();
            $('img').eq($(this).index()).show();//$(this).index()返回当前索引号
        })
        
    })
</script>
</body>
</html>